package uk.co.q3c.deplan.server.unit.dao;

import java.util.List;

import org.testng.Assert;
import org.testng.annotations.Test;

import uk.co.q3c.deplan.client.domain.resource.IndividualResource;
import uk.co.q3c.deplan.client.domain.resource.ResourceGroup;
import uk.co.q3c.deplan.client.domain.task.BaseTask;
import uk.co.q3c.deplan.client.domain.task.Task;
import uk.co.q3c.deplan.server.unit.domain.task.DomainBase_UT;

@Test
public class ResourceService_UT extends DomainBase_UT {
	@Override
	protected void beforeMethod() throws Exception {
		super.beforeMethod();
	}

	/**
	 * test suspended
	 */
	@Test(enabled = false)
	public void usingResource() {
		IndividualResource fred = createResource("fred");
		IndividualResource ginger = createResource("ginger");
		ResourceGroup groupOne = createResourceGroup("group one");
		BaseTask task1 = createStandardTask("task1");
		BaseTask task2 = createStandardTask("task2");
		List<Task> results = connection.resourceService()
				.tasksUsingResource(fred);
		Assert.assertEquals(results.size(), 0);
	}

}
